export type ModelConfigDefTree =
  | IModel
  | IContainer
  | IParameter
  | IReference
  | ILiteral
  | IDestination

export interface IConfigDefState {
  moduleConfigdefs: Map<string, IModuleConfigdef>
}

export interface IModuleConfigdef {
  model: IModel
}

export interface INode {
  id: string
  parentId?: string
  data: any
  children: INode[] | null
}

export interface IModel {
  label: string
  isNew: boolean
  type: string
  description: string
  lowerMultiplicity: string
  upperMultiplicity: string
  compileTimeType: string
}
export interface IContainer {
  label: string
  type: 'container' | 'subContainer'
  isNew: boolean
  lowerMultiplicity: string
  description: string
  upperMultiplicity: string
}

export interface IParameter {
  label: string
  type: 'parameter'
  isNew: boolean
  description: string
  lowerMultiplicity: string
  upperMultiplicity: string
  parameterType: string
  defaultValue: string
  max?: string
  min?: string
}

export interface IReference {
  label: string
  isNew: boolean
  type: 'reference'
  referenceType: ''
  description: string
  lowerMultiplicity: string
  upperMultiplicity: string
}

export interface ILiteral {
  label: string
  isNew: boolean
  type: 'literal'
}

export interface IDestination {
  label: string
  isNew: boolean
  type: 'destination'
}
